﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Data
{
    using Common.Define;
    using Common.Device;

    /**
       *  \brief 主要用来存放机器人及相关模型参数
       */
    public class SCARA_Robot: DeviceBase
    {
        public static Robot Default = new Robot()
        {
                /** 设备的ID */
                ID = 16,
                /** 设备名称 */
                DeviceName ="SCARA_Robot_Default",
                /** 设备类别 */
                DeviceType = RobotDeviceType.SerialRobot,
                /*    DeviceType = ModelType.TestMode;*/
                /** 设备数据 **/
                ModelData = new Model()
                {
                       ModelNumber = 1, 
                       JointNumber = 6, 
                       MovementJoints = new List<uint>(){2, 3, 4, 4},
                       AssemblyState = "obj", 
                       AssemblyMode = true,
                       JointInit =  new List<double>(){0, 0, -50, 0},
                       ModelState =  new List<string>(){"robot_base",  "robot_arm_1",  "robot_arm_2",  "robot_z_axis", "tool"},
                       Urls = new List<string>() { "./assets/model/OBJ/robot4_1/robot_4_axis.obj" },
                       Offset = new List<JointOffset>()
                       {
                            new JointOffset(){rx = 0, ry = 0, rz = 0, x = 0, y = 0, z = 0, jointMode = true},
                            new JointOffset(){rx = 0, ry = 0, rz = 1, x = 0, y = 0, z = 0, jointMode = true},
                            new JointOffset(){rx = 0, ry = 0, rz = 1, x = 250, y = 0, z = 0, jointMode = true },
                            new JointOffset(){rx = 0, ry = 0, rz = 1, x = 0, y = 0, z = 0, jointMode = true },
                            new JointOffset(){rx = 0, ry = 0, rz = 1, x = 400, y = 0, z = 0, jointMode = true }
                      },
                      DHparameter = new List<DHParameter>()
                      {
                             new DHParameter(){limsup = 165, liminf = -165, alpha = 0, a = 0, theta = 0, d = 250, jointMode = true},
                             new DHParameter(){limsup = 140, liminf = -140, alpha = 0, a = 250, theta = 0, d = 0, jointMode = true},
                             new DHParameter(){limsup = -50, liminf = -175, alpha = 0, a = 150, theta = 0, d = 0, jointMode = false},
                             new DHParameter(){limsup = 180, liminf = -180, alpha = 0, a = 0, theta = 0, d = -90, jointMode = true},
                      },
                      ModelColorGroup = new List<uint>{ 0 },
                      /** 设备接口 **/
                      InterfaceData = new ModelInterface()
                     {
                         InterfaceNum = 0,
                         HoleRadius = 0,
                         Radius = 0
                     }
               },
                /** 最大/最小运行范围 **/
               //minOperationRange = 100,
               //maxOperationRange = 400
        };

    }
}
